
<h1>New Recipe</h1>

<div id ="ingredients_list">
   <%= render(:partial => "ingredient_list", :object => session[:current_recipe]) %>
</div>
<% form_remote_tag :url => {:action => "recipe_add_ingredient"} do %>
   <%= submit_tag "New Ingredient" %>
<% end %>
    
 <h2>Recipe Info</h2>
<%  form_for @recipe, :url => { :action => "create" } do |f| %>
  <%= f.error_messages %>
<p>
  <%= f.label :title %><br />
  <%= f.text_field :title %>
</p>

<p>
  <%= f.label :category %><br />
  <%= f.text_field :category %>
</p>

<p>
  <%= f.label :directions %><br />
  <%= f.text_area :directions, :cols => 60, :rows => 10  %>
</p>
<p>
  <%= f.label :description %><br />
  <%= f.text_area :description, :cols => 60, :rows => 5 %>
</p>
  <p>
<%= f.submit "Create" %>
  </p>
<% end %>

<%= link_to 'Back', :controller=>"recipe", :action=>"index" %>
 
